/*
 * Copyright (c) 2025 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
import { SCREEN_HEIGHT } from '../../constants';

// 默认值
const DEFAULT_HANDLE_HEIGHT = 24;
const DEFAULT_OVER_DRAG_RESISTANCE_FACTOR = 2.5;
const DEFAULT_ENABLE_CONTENT_PANNING_GESTURE = false;
const DEFAULT_ENABLE_HANDLE_PANNING_GESTURE = true;
const DEFAULT_ENABLE_OVER_DRAG = true;
const DEFAULT_ENABLE_PAN_DOWN_TO_CLOSE = true;
const DEFAULT_ENABLE_DRAG_TO_CLOSE = true;
const DEFAULT_ANIMATE_ON_MOUNT = true;
const DEFAULT_DYNAMIC_SIZING = false;

// 捕捉点范围（屏幕高度的百分比）
const DEFAULT_SNAP_POINT = '70%';
const MAX_SNAP_POINT_PERCENTAGE = 0.9; // 90%
const MIN_SNAP_POINT_PERCENTAGE = 0.4; // 40%
const DRAG_TO_CLOSE_THRESHOLD_PERCENTAGE = 0.33; // 33%

// 头部（固定模式）
const DEFAULT_HEADER_MODE = 'draggable';
const DEFAULT_HEADER_HEIGHT = 52;
const DEFAULT_HEADER_CLOSE_BUTTON_COLOR = '#0F294D';

// 初始化值
const INITIAL_VALUE = Number.NEGATIVE_INFINITY;
const INITIAL_SNAP_POINT = -999;
const INITIAL_CONTAINER_HEIGHT = -999;
const INITIAL_CONTAINER_OFFSET = {
  top: 0,
  bottom: 0,
  left: 0,
  right: 0,
};
const INITIAL_HANDLE_HEIGHT = -999;
const INITIAL_POSITION = SCREEN_HEIGHT;

export {
  DEFAULT_HANDLE_HEIGHT,
  DEFAULT_OVER_DRAG_RESISTANCE_FACTOR,
  DEFAULT_ENABLE_CONTENT_PANNING_GESTURE,
  DEFAULT_ENABLE_HANDLE_PANNING_GESTURE,
  DEFAULT_ENABLE_OVER_DRAG,
  DEFAULT_ENABLE_PAN_DOWN_TO_CLOSE,
  DEFAULT_ENABLE_DRAG_TO_CLOSE,
  DEFAULT_DYNAMIC_SIZING,
  DEFAULT_ANIMATE_ON_MOUNT,
  // 捕捉点
  DEFAULT_SNAP_POINT,
  MAX_SNAP_POINT_PERCENTAGE,
  MIN_SNAP_POINT_PERCENTAGE,
  DRAG_TO_CLOSE_THRESHOLD_PERCENTAGE,
  // 头部
  DEFAULT_HEADER_MODE,
  DEFAULT_HEADER_HEIGHT,
  DEFAULT_HEADER_CLOSE_BUTTON_COLOR,
  // 布局
  INITIAL_POSITION,
  INITIAL_CONTAINER_HEIGHT,
  INITIAL_CONTAINER_OFFSET,
  INITIAL_HANDLE_HEIGHT,
  INITIAL_SNAP_POINT,
  INITIAL_VALUE,
};
